package com.zhaoxi.project.wms.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhaoxi.framework.aspectj.lang.annotation.Excel;
import com.zhaoxi.framework.web.domain.BaseEntity;
import lombok.Data;

/**
 * 跟物品有关的订单对象 wms_order
 *
 * @author zhaoxi
 * @date 2023-07-22
 */
@Data
public class WmsOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 库单ID
     */
    private Long id;

    /**
     * 库单ID
     */
    private Long LineId;

    /**
     * 单据类型
     */
    @Excel(name = "单据类型")
    private String orderTypeId;

    /**
     * 发货方
     */
    @Excel(name = "id")
    private Long partnerId;

    /**
     * 发货方
     */
    @Excel(name = "名称")
    private String partnerName;

    /**
     * 发货方
     */
    @Excel(name = "己方仓库id")
    private Long selfWhId;

    /**
     * 发货方
     */
    @Excel(name = "己方仓库")
    private String selfWhName;

    /**
     * 收货方
     */
    @Excel(name = "对方仓库id")
    private Long otherWhId;

    /**
     * 收货方
     */
    @Excel(name = "对方仓库")
    private String otherWhName;

    /**
     * 单据状态
     */
    @Excel(name = "单据状态")
    private String state;

    /**
     * 单据来源
     */
    @Excel(name = "单据来源")
    private Long sourceId;

    /**
     * 生产厂商
     */
    @Excel(name = "生产厂商")
    private Long manufacturerId;

    /**
     * 申请人
     */
    @Excel(name = "申请人")
    private Long userApplicantId;

    /**
     * 审核人
     */
    @Excel(name = "审核人")
    private Long userAuditorId;

    /**
     * 发货员
     */
    @Excel(name = "发货员")
    private Long userDeliveryId;

    /**
     * 发货员
     */
    @Excel(name = "单据财务类别")
    private String fmsType;

    /**
     * 发货员
     */
    @Excel(name = "单据仓储类别")
    private String stockType;

    /**
     * 租户
     */
    private Long tenantId;

    private List<WmsOrderLine> lineList;
    /**
     * ===================明细表===================================================
     * 产品物料编码
     */
    private String productCode;

    /**
     * 产品名称
     */
    private  String productName;

    /**
     * 批次号
     */
    private String batchCode;

    /**
     * 单位
     */
    @Excel(name = "单位")
    private String measureUnit;

    /**
     * 商品单价
     */
    @Excel(name = "商品单价")
    private Double price;

    /**
     * 入库数量
     */
    @Excel(name = "入库数量")
    private Double quantity;

    /**
     * 入库数量
     */
    @Excel(name = "总金额")
    private Double totalMoney;
    /**
     * 入库数量
     */
    @Excel(name = "应收金额")
    private Double costMoney;
    /**
     * 入库数量
     */
    @Excel(name = "优惠金额")
    private Double discountMoney;
    /**
     * 入库数量
     */
    @Excel(name = "实收金额")
    private Double money;

    /**
     * 库位ID
     */
    @Excel(name = "库位ID")
    private Long areaId;

    /**
     * 有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireDate;

}
